<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2019/4/30
  Time: 10:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../common.jsp"%>
<script type="application/javascript" src="${ctx}/static/echarts/echarts.min.js"></script>
<style type="text/css">
    .main_div{
        width: 100%;
        height: 50%;
        display: flex;
        flex-direction: row;
    }

    .bus_msg_class{
        flex_grow:1
    }

    .par_class{
        flex-grow: 1;
    }
    .bar_class{
        flex-grow: 1;
    }

    .main_buttom_class{
        width: 100%;
        height: 50%;
        display: flex;
        flex-direction: row;
    }
    .line_class{
        flex-grow: 2;
    }
    .table_msg{
        flex-grow: 1;
        background-color: indianred;
        height: 50%;
    }

</style>
<html>
<head>
    <title>Echarts</title>
</head>
<body>
<div class="main_div">
    <div class="bus_msg_class">
        <label>企业基本情况</label>
      <table>
          <tr>
              <td>纳税人编号</td>
              <td>10001018921</td>
          </tr>
          <tr>
              <td>纳税人名称</td>
              <td>申万宏源证券有限公司</td>
          </tr>
          <tr>
              <td>企业法人</td>
              <td>张三</td>
          </tr>
          <tr>
              <td>注册资本</td>
              <td>300万</td>
          </tr>
          <tr>
              <td>注册类型</td>
              <td>其他</td>
          </tr>
          <tr>
              <td>所属行业</td>
              <td>其他行业</td>
          </tr>

      </table>
    </div>
    <div id="par" class="par_class"></div>
    <siv id="bar" class="bar_class"></siv>
</div>
<div class="main_buttom_class">
    <div class="table_msg"></div>
    <div class="line_class" id="line"></div>

</div>
<script type="application/javascript">
$(function(){
    var par =echarts.init(document.getElementById("par"));
    var bar =echarts.init(document.getElementById("bar"));
    var line= echarts.init(document.getElementById("line"));
    $.ajax({
       url:ctx+"/charts/par",
        type : "GET",
        success : function(data) {
            if (data.status == true) {
                par.setOption(JSON.parse(data.respObj));
            }
        }
    });
    $.ajax({
        url:ctx+"/charts/bar",
        type : "GET",
        success : function(data) {
            if (data.status == true) {
               // console.log(JSON.parse(JSON.stringify(data.respObj)));
                bar.setOption(JSON.parse(data.respObj));
            }
        }
    });
    $.ajax({
        url:ctx+"/charts/line",
        type : "GET",
        success : function(data) {
            if (data.status == true) {
                line.setOption(JSON.parse(data.respObj));
            }
        }
    });
});
</script>
</body>
</html>
